/*
 * @Author: ipk518 18163976442@163.com
 * @Date: 2023-08-16 14:15:05
 * @LastEditors: ipk518 18163976442@163.com
 * @LastEditTime: 2023-08-16 14:27:00
 * @FilePath: /WingsUpdater-main/inc/Ini.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

#pragma once 

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stddef.h>

#define CONFIGLEN           256

enum INI_RES
{
    INI_SUCCESS,            //成功  
    INI_ERROR,              //普通错误  
    INI_OPENFILE_ERROR,     //打开文件失败  
    INI_NO_ATTR            //无对应的键值  
};


extern int readStringValue(const char* section, char* key, char* val, const char* file);
extern int writeStringVlaue(const char* section, char* key, char* val, const char* file);
extern int readIntValue(const char* section, char* key, const char* file);
extern int writeIntValue(const char* section, char* key, int val, const char* file);